package com.zygh.policeasset.mapper;

import com.zygh.policeasset.pojo.ContractPay;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/mapper/ContractPayMapper.class */
public interface ContractPayMapper {
    @Select({"select * from contract_pay  where contractpay_id=#{contractPayId} and contractpay_section=#{contractPaySection} order by contractpay_section "})
    @Results(id = "ContractPay", value = {@Result(property = "id", column = "id"), @Result(property = "contractPayId", column = "contractpay_id"), @Result(property = "contractPaySection", column = "contractpay_section"), @Result(property = "contractPayNum", column = "contractpay_num"), @Result(property = "contractPayMoney", column = "contractpay_money"), @Result(property = "contractPayTime", column = "contractpay_time"), @Result(property = "paymentRatio", column = "payment_ratio"), @Result(property = "paymentRatioAmount", column = "payment_ratio_amount"), @Result(property = "paymentRatio1", column = "payment_ratio1"), @Result(property = "paymentRatio2", column = "payment_ratio2"), @Result(property = "paymentRatio3", column = "payment_ratio3"), @Result(property = "contractpayPercentage", column = "contractpay_percentage"), @Result(property = "paymentRatioAmount1", column = "payment_ratio_amount1"), @Result(property = "paymentRatioAmount2", column = "payment_ratio_amount2"), @Result(property = "paymentRatioAmount3", column = "payment_ratio_amount3")})
    List<ContractPay> findByProjectAndSection(@Param("contractPayId") String str, @Param("contractPaySection") Integer num);

    @Insert({"insert into contract_pay (contractpay_id,contractpay_section,contractpay_num,contractpay_money,contractpay_time,payment_ratio,payment_ratio_amount,payment_ratio1,payment_ratio2,payment_ratio3,contractpay_percentage,payment_ratio_amount1,payment_ratio_amount2,payment_ratio_amount3) values (#{contractPayId},#{contractPaySection},#{contractPayNum},#{contractPayMoney},#{contractPayTime},#{paymentRatio},#{paymentRatioAmount},#{paymentRatio1},#{paymentRatio2},#{paymentRatio3},#{contractpayPercentage},#{paymentRatioAmount1},#{paymentRatioAmount2},#{paymentRatioAmount3})"})
    Integer add(ContractPay contractPay);

    @Update({"update contract_pay set contractpay_id=#{contractPayId},contractpay_section=#{contractPaySection},contractpay_num=#{contractPayNum},contractpay_money=#{contractPayMoney},contractpay_time=#{contractPayTime},payment_ratio=#{paymentRatio},payment_ratio1=#{paymentRatio1},payment_ratio2=#{paymentRatio2},payment_ratio3=#{paymentRatio3},payment_ratio_amount=#{paymentRatioAmount},payment_ratio_amount1=#{paymentRatioAmount1},payment_ratio_amount2=#{paymentRatioAmount2},payment_ratio_amount3=#{paymentRatioAmount3},contractpay_percentage=#{contractpayPercentage} where id=#{id}"})
    Integer update(ContractPay contractPay);

    @Delete({"delete from contract_pay where id=#{id}"})
    Integer remove(int i);

    @Delete({"delete from contract_pay where contractpay_section=#{contractpaySection}"})
    Integer delete(int i);
}